from apscheduler.schedulers.blocking import BlockingScheduler


class ScheduledTask:
    def __init__(self):
        self.__scheduler = BlockingScheduler()

    def createSchedule(self, func, time_hour: int, time_minute: int):
        self.__scheduler.add_job(func, 'cron', hour=time_hour, minute=time_minute)

    def run(self):
        self.__scheduler.start()
